<?php
require_once 'conf/verifica.php';
require_once 'Usuario.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GestionDVD - Home</title>
<link rel="shortcut icon" href="images/icono.ico" />
<link type="text/css" rel="stylesheet" href="css/calendar.css" media="screen"/>
<link type="text/css" rel="stylesheet" href="css/estilo.css" />
<script type="text/javascript" src="scripts/calendar.js"></script>
<script type="text/javascript" src="scripts/scripts.js"></script>
<script type="text/javascript" src="scripts/ultimo.js"></script> 
</head>

<body>
<div id="mainContainer">
<?php require("conf/menu.html"); ?>
<div id="Imprimir" align="center"><a href="javascript:Imprimir();"><img src="images/imprimir.jpg" alt="Imprimir" width="22" height="22" border="0" /> Imprimir</a></div>
<table width="543" border="1" align="center" class="primary">
    <tr>
        <td colspan="8"><div align="center"><strong><em>Lista de Directores</em></strong></div></td>
    </tr>
</table>
<table width="543" border="1" align="center" id="myTable" class="primary">
    <colgroup>
        <col id="col1_1"></col>
        <col id="col1_2"></col>
        <col id="col1_3"></col>
        <col id="col1_4"></col>
    </colgroup>
    <thead>
        <tr>
            <td><strong>N</strong></td>
            <td><strong>Nick</strong></td>
            <td><strong>Mail</strong></td>
            <td><strong>Telefono</strong></td>
        </tr>
  </thead>
  <tbody>
  <?php 
    $us = new Usuario();
    $arr = $us->listar();
    $tf = count($arr); // Total Filas
    $tc = (count($arr, COUNT_RECURSIVE) - count($arr)) / count($arr); // Total Columnas
    for ($i =0;$i <$tf; $i++){
        for ($j=0; $j<$tc;$j++) {
            if ($j == 0) echo "<tr>";
            echo "<td>".$arr[$i][$j]."</td>";
        }
        echo "\n</tr>";
    }
  ?>
  </tbody>
  </table>
<script type="text/javascript">
    initSortTable('myTable',Array('S','S','S', 'S'));
</script>
</div>
</body>
</html>